{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "from random import random, choice\n",
    "from core import Agent\n",
    "from gym import Env\n",
    "import gym\n",
    "from gridworld import WindyGridWorld, SimpleGridWorld\n",
    "from utils import str_key, set_dict, get_dict\n",
    "from utils import epsilon_greedy_pi, epsilon_greedy_policy\n",
    "from utils import greedy_policy, learning_curve"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "class SarsaLambdaAgent(Agent):\n",
    "    def __init__(self, env:Env, capacity:int = 20000):\n",
    "        super(SarsaLambdaAgent, self).__init__(env, capacity)\n",
    "        self.Q = {}\n",
    "\n",
    "    def policy(self, A, s, Q, epsilon):\n",
    "        return epsilon_greedy_policy(A, s, Q, epsilon)\n",
    "    \n",
    "    def learning_method(self, lambda_ = 0.9, gamma = 0.9, alpha = 0.1, epsilon = 1e-5, display = False):\n",
    "        self.state = self.env.reset()\n",
    "        s0 = self.state\n",
    "        if display:\n",
    "            self.env.render()\n",
    "        a0 = self.perform_policy(s0, self.Q, epsilon)\n",
    "        # print(self.action_t.name)\n",
    "        time_in_episode, total_reward = 0,0\n",
    "        is_done = False\n",
    "        E = {}\n",
    "        while not is_done:\n",
    "            # add code here\n",
    "            s1, r1, is_done, info, total_reward = self.act(a0)\n",
    "            if display:\n",
    "                self.env.render()\n",
    "            a1 = self.perform_policy(s1, self.Q, epsilon)\n",
    "            \n",
    "            q = get_dict(self.Q, s0, a0)\n",
    "            q_prime = get_dict(self.Q, s1, a1)\n",
    "            delta = r1 + gamma * q_prime - q\n",
    "            \n",
    "            e = get_dict(E, s0, a0)\n",
    "            e += 1\n",
    "            set_dict(E, e, s0, a0)\n",
    "\n",
    "            for s in self.S:\n",
    "                for a in self.A:\n",
    "                    e_value = get_dict(E, s, a)\n",
    "                    old_q = get_dict(self.Q, s, a)\n",
    "                    new_q = old_q + alpha * delta * e_value\n",
    "                    new_e = gamma * lambda_ * e_value\n",
    "                    set_dict(self.Q, new_q, s, a)\n",
    "                    set_dict(E, new_e, s, a)\n",
    "                    \n",
    "            s0, a0 = s1, a1\n",
    "            time_in_episode += 1\n",
    "        if display:\n",
    "            print(self.experience.last_episode)\n",
    "        return time_in_episode, total_reward"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 800/800 [00:40<00:00, 19.78it/s]\n"
     ]
    }
   ],
   "source": [
    "env = WindyGridWorld()\n",
    "agent = SarsaLambdaAgent(env, capacity = 100000)\n",
    "\n",
    "statistics = agent.learning(lambda_ = 0.8, gamma = 1.0, epsilon = 0.2,\\\n",
    "    decaying_epsilon = True, alpha = 0.5, max_episode_num = 800, display = False)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "No handles with labels found to put in legend.\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvFvnyVgAAIABJREFUeJztnXt4W8WdsN+xnSgJtolliBwsg2USOY0DMrKLMXgTCr0AvUC70EJpoYWWUi69sN1Cv/12S3e/3rZsLxQot7aQtlxaCoVSemEhTmowBluxkshgJVgBKxc5sUxiJbESS/P94RNXsh1ZxzeN7HmfR4+PZkaj16MzPx2dM2dGSCnRaDQazewlJ9MCGo1Go5ledKDXaDSaWY4O9BqNRjPL0YFeo9FoZjk60Gs0Gs0sRwd6jUajmeXoQK/RaDSzHB3oNRqNZpajA71Go9HMcvIyLQBwwgknyPLy8kxraDQaTVbR1ta2V0p54njllAj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/uDJF8we9VItwIBhi6WFRnbVjn2RZiLJuh0AUNX/08cUe5EINfYrmBoB0r53sf6/yboNWWfGUO/7BIvlt0wUa+ENlufifYy6lgL/HhEekb3rRReGd2/UnhlbP86llOm9y2zjymtzPSbw3EMfcsen5D2K4aGIG1iaFHxxA/53xj6huwkYXQBQ6MV/Ebev03A41GGfnIdYejc2bUMnc97gaEhT/+b8GEJ4G7jvTYDtQn1XMPQBaFtJH951QJbjNfcRXpD4MZy2sbQucekoVvAPzM09Ksd8AAfHu+9j/X/TdBryj4zo3O8avyvvwMsE/Uy0h8Crh9RdkbaC2hg6Gf4poTP7CIF9q1jeWV0/0rhlbH961hOmd63zD70nbEajUYzy1HhHL1Go9FophEd6DUajWaWowO9RqPRzHJ0oNdoNJpZjg70Go1GM8vRgV6j0WhmOTrQazQazSxHB3qNRqOZ5fx/IPeOjwCKzaIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "learning_curve(statistics,0,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode 800    19 steps,total reward:-18.00  \n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "(19, -18)"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "agent.learning_method(lambda_ = 0.9, epsilon = 0.0001, display = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 2/2 [00:00<00:00,  7.58it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode 801    19 steps,total reward:-18.00  \n",
      "episode 802    54 steps,total reward:-53.00  \n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "([19, 73], [-18, -53], [1, 2])"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "agent.learning(max_episode_num = 2, display = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "env.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
